package com.wxmblog.photo.controller;

//import org.apache.shiro.authz.annotation.RequiresPermissions;

import com.wxmblog.base.common.annotation.AuthIgnore;
import com.wxmblog.base.common.web.domain.R;
import com.wxmblog.photo.common.rest.response.category.CategoryResponse;
import com.wxmblog.photo.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperationSort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 备注
 *
 * @author wanglei
 * @email 378526425@qq.com
 * @date 2023-06-20 15:24:40
 */
@RestController
@RequestMapping("photo/category")
@Api(tags = "前台-分类管理")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    @ApiOperation("分类列表")
    @ApiOperationSort(value = 1)
    @GetMapping("/list")
    @AuthIgnore
    public R<List<CategoryResponse>> page() {
        return R.ok(categoryService.listAll());
    }

}
